package Work;

public class Person {
    private int age;

    public void setAge(int age) {
        if (age<0||age>120){

            System.out.println("非法年龄");

        } else {

            this.age = age;

        }
    }
}
